package com.zy.openchat.core.model.contact;

import android.os.Parcel;
import android.os.Parcelable;

public class UpdateChatActionInfo implements Parcelable {
    public long chat_id;
    public long user_id;
    public ChatActionInfo action;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.chat_id);
        dest.writeLong(this.user_id);
        dest.writeParcelable(this.action, flags);
    }

    public void readFromParcel(Parcel source) {
        this.chat_id = source.readLong();
        this.user_id = source.readLong();
        this.action = source.readParcelable(ChatActionInfo.class.getClassLoader());
    }

    public UpdateChatActionInfo() {
    }

    protected UpdateChatActionInfo(Parcel in) {
        this.chat_id = in.readLong();
        this.user_id = in.readLong();
        this.action = in.readParcelable(ChatActionInfo.class.getClassLoader());
    }

    public static final Creator<UpdateChatActionInfo> CREATOR = new Creator<UpdateChatActionInfo>() {
        @Override
        public UpdateChatActionInfo createFromParcel(Parcel source) {
            return new UpdateChatActionInfo(source);
        }

        @Override
        public UpdateChatActionInfo[] newArray(int size) {
            return new UpdateChatActionInfo[size];
        }
    };
}
